<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-1.8.2.min.js"></script>
    <style>
        .focused {
            background-color: #abcdef;
        }
    </style>
</head>
<body>
    <div id="content">
        <input tabindex="1">
        <input tabindex="2">
        <select tabindex="3">
            <option>select menu</option>
        </select>
        <div tabindex="4">
            a div
        </div>
    </div>
</body>
<script>
    $(function () {
        $("#content").delegate("*", "focus blur", function (event) {
            var e = $(this);
            setTimeout(function () {
                e.toggleClass("focused", e.is(":focus"));
            },0)
        })
    })
</script>
</html>